﻿using System;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            //常量
            const double PI = 3.1415926;
            int r = 3;
            Console.WriteLine("圆的周长是" + 2 * PI * r);
            Console.WriteLine("圆的面积是" + PI * r * r);

            var i = 3 > 1;
            //一个分支
            if (i)
            {
                Console.WriteLine("这是对的");
            } 
            //两个分支
            if (i)
            {
                Console.WriteLine("这个是正确的");
            }
            else
            {
                Console.WriteLine("抱歉，这个是错的");
            }
            //多个分支
            int n = 9;
            if (n > 4)
            {
                Console.WriteLine("大于4");
            }
            else if (n>3)
            {
                Console.WriteLine("大于3");
            }
            else if (n>2)
            {
                Console.WriteLine("大于2");
            }
            else
            {
                Console.WriteLine("小于等同于2");
            }
            //switch用法
            int height = 185;
            switch(height/10)
            {
                case 20:
                Console.WriteLine("特别高");
                    break;
                case 19:
                    Console.WriteLine("很高");
                    break;
                case 18:
                    Console.WriteLine("高");
                    break;
                case 17:
                    Console.WriteLine("合格");
                    break;
                default:
                    Console.WriteLine("不是很高" );
                    break;
            }
        }

    }
}

class UserRole
{
    //这是一个类
}